import { Pipe, PipeTransform } from '@angular/core';
import { ToolService } from '../service/tool.service';

@Pipe({
  name: 'countdown'
})
export class CountdownPipe implements PipeTransform {

  transform(value: any, args?: any): any {
    if (ToolService.isEmpty(value)) {
      return "已封盘";
    } else {
      if (args == true && args!='lhc' && args!='f3d' && args!='pl3') {
        return ToolService.formateTime(value, true);
      }
      return ToolService.formateTime(value, true);
    }
  }
}
